package com.example.demo.shiro;

import org.apache.shiro.authz.Permission;
import org.apache.shiro.authz.permission.PermissionResolver;
import org.apache.shiro.authz.permission.WildcardPermission;
public class UrlPermissionResolver implements PermissionResolver {
    @Override
    public Permission resolvePermission(String s) {
        System.out.println(">>>>>>>>>s>>>>>>>>>>>>>"+s);
        if(s.startsWith("/")){
            return new UrlPermission(s);
        }
        return new WildcardPermission(s);
    }
}
